<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>Number Users Country</title>
        <link rel="stylesheet" href="Style.css" type="text/css">
    </head>
    <?php
    $country_id = $_REQUEST["flag"];

    //connect database
    include "ConnectDb.php";
    ?>
    <body>
        <?php
        include "Header.php";
        ?>
        <form id="form1" name="form1" method="post" action="">
            <table width="500" border="1" cellpadding="1" cellspacing="1">
                <tr>
                    <th>User ID</th>
                    <th>User Name</th>
                    <th>Email</th>
                    <th>Full Name</th>
                </tr>
                <?php
                // 
                $query = "SELECT user_id, user_name, email, full_name
                            FROM users
                            WHERE country_id = '$country_id'
                            ORDER BY user_id ASC";

                $result = mysql_query($query, $mysql);
                if (mysql_num_rows($result) != 0) {
                    $count = 1;
                    while ($row = mysql_fetch_row($result)) {
                        echo "<tr>";
                        echo "<td>$row[0]</td>";
                        echo "<td>$row[1]</td>";
                        echo "<td>$row[2]</td>";
                        echo "<td>$row[3]</td>";
                        echo "</tr>";
                    }
                }
                ?>
            </table>
        </form>
    </body>
</html>
